//---------------[CSE420]----------[Project #4]----------[Part #3]---------------
#ifndef _COMMON_H_
#define _COMMON_H_

#include <stdint.h>
#include <math.h>

#define TIMING
#define N			         4
#define MATRIX_SIZE        N * N
#define BLOCK_SIZE         2                                   // Block size; N % BLOCK_SIZE must = 0
#define BLOCK_SIZE_SQUARED (BLOCK_SIZE * BLOCK_SIZE)           // Pre-calculated to save a few multiplications

/* Control block for DMA */
typedef struct _CONTROL_BLOCK
{
	int *blockA;
	int *blockB;
	int *SPU_result;
	int *padding[1];
} CONTROL_BLOCK;

/* Alignment macros */
#define QWORD_ALIGNED __attribute__((aligned(16)))
#define CACHE_ALIGNED __attribute__((aligned(128)))

#endif
//------------------------------------[END]--------------------------------------
